RUIRU, Kenya — Before last year, Richard Ochieng’, 26, could not recall experiencing racism firsthand. Not while growing up as an orphan in his village near Lake Victoria where everybody was, like him, black. Not while studying at a university in another part of Kenya. Not until his job search led him to Ruiru, a fast-growing settlement at the edge of the capital, Nairobi, where Mr. Ochieng’ found work at a Chinese motorcycle company that had just expanded to Kenya.